package com.xinghou.platform.dao.main;

import java.sql.Timestamp;
import java.util.List;

import org.springframework.dao.DataAccessException;

import com.xinghou.platform.model.main.VisitFrom;

public interface VisitFromDAO {
	
	 public VisitFrom getVisitFromById(Integer Id)throws DataAccessException;
	 
	 public int updateVisitFrom(VisitFrom visitFrom) throws DataAccessException;
		
	 public int saveVisitFrom(VisitFrom visitFrom) throws DataAccessException;
	 
	 /**
	  * 查询我访问Users
	  * @param fromUserId
	  * @param time		最小时间
	  * @param rowNum	行数
	  * @return
	  */
	 public List<VisitFrom> getVisitFromByFromUserId(Integer fromUserId,Timestamp time,int rowNum);
	 
	 /**
	  * 查询是否互相来访
	  * @param fromUserId	userid
	  * @param toUserId		我访问的userid
	  * @return
	  * @throws DataAccessException
	  */
	 public VisitFrom getVisitFromByTwoId(int fromUserId,int toUserId)throws DataAccessException;

	 /**
	  * 查询我访问Users不重复
	  * @param fromUserId
	  * @param time		最小时间
	  * @param rowNum	行数
	  * @return
	  */
	 public List<VisitFrom> getVisitFromGroupByFromUserId(Integer fromUserId,Timestamp time, int rowNum);
}
